package tr.edu.metu.is550.isell.service;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.ArrayList;
import java.util.List;

@XmlRootElement(name = "person")
public class MyBean {
    @XmlElement(name = "name1")
    private String name;
    @XmlElement(name = "name2")
    private String surname;

    public MyBean() {
    }

    public MyBean(String name, String surname) {
        this.name = name;
        this.surname = surname;
    }

    @XmlElement(name = "address")
    private List<MyBeanItem> items = new ArrayList<MyBeanItem>();

    public void addItem(MyBeanItem item) {
        this.items.add(item);
    }
}
